package com.jingdianjichi.subject.common.enums;

import lombok.Getter;

@Getter
public enum CategoryTypeCodeEnum {

    PRIMARY(1, "岗位大类"),
    SECOND(2, "二级岗位");

    public int code;
    public String desc;

    CategoryTypeCodeEnum(int code, String desc){
        this.code=code;
        this.desc=desc;
    }

    public static CategoryTypeCodeEnum getByCode(int codeVal){
        for(CategoryTypeCodeEnum resultCodeEnum: CategoryTypeCodeEnum.values()){
            if(resultCodeEnum.code == codeVal){
                return resultCodeEnum;
            }
        }
        return null;
    }

}
